/*
 * Created: 2022-09-16 17:23:11
 * Author : 涛涛涛
 */

import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import RootPageComponent from '@/pages/components/RootPageComponent/RootPageComponent';
export interface IProps extends ICompProps {}
TestRootPageComponent.defaultProps = {} as Partial<IProps>;
function TestRootPageComponent(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('TestRootPageComponent', className);
    return (
        <RootView className={localClassName} style={style}>
            <RootPageComponent
                scrollOffsetBottom={0}
                headFixedSlot={
                    <View>
                        <View>我是头呀</View>
                        <View>我是头呀</View>
                        <View>我是头呀</View>
                        <View>我是头呀</View>
                    </View>
                }>
                {({ height }) => {
                    return (
                        <View className="middle" style={{ height: height + 'px' }}>
                            中间{height}
                        </View>
                    );
                }}
            </RootPageComponent>
        </RootView>
    );
}
export default React.memo(TestRootPageComponent as FC<IProps>);
const RootView = styled(View)`
    &.TestRootPageComponent {
    }
`;
